﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Acc.Lib.Providers;
using ICanPay;

namespace Acc_Web
{
    public class BaseSrv
    {
        protected void InvokeSrv()
        {
            var yeepayMerchant = new Merchant();
            yeepayMerchant.UserName = "10000800500";
            yeepayMerchant.Key = "L05KCD6sqv8t52p61l8v9k340l18go6M8955Gno662CRYdAi414Rx5928370";

            var paymentNotify = PayGatewayFactory.GetGatewayNotify();
            if (paymentNotify == null)
            {
                return;
            }
            paymentNotify.PayGateway.Merchant = yeepayMerchant;
            if (paymentNotify.HasNotify)
            {
                
                var orderId = paymentNotify.PayGateway.Order.OrderId.Replace("vsacc_", "");

                var provider = ActionLoader.SrvOrder(Int64.Parse(orderId));
            }
        }
    }
}
